package com.lm.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class OperationLogAspect {
    @Pointcut("@annotation(com.lm.annotation.OperationLog)")
    private void operationLog() {}

    @Around("operationLog()")
    public Object operator(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("hello-world");
        joinPoint.proceed();
        return null;
    }
}